package cc.mrbird.unit.service;

import cc.mrbird.common.domain.QueryRequest;
import cc.mrbird.system.domain.User;
import cc.mrbird.unit.domain.AuxiliaryInfor;
import cc.mrbird.unit.domain.ContactInfor;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

@CacheConfig(cacheNames = "AuxiliaryInforService")
public interface AuxiliaryInforService {

    List<AuxiliaryInfor> findAllList(AuxiliaryInfor auxiliaryInfor, QueryRequest request);

    @CacheEvict(allEntries = true)
    void add(AuxiliaryInfor auxiliaryInfor,User user);
    @CacheEvict(key = "#p0", allEntries = true)
    void updateauxiliary(AuxiliaryInfor auxiliaryInfor);
    @CacheEvict(key = "#p0", allEntries = true)
    void delete(String ids);

    @Cacheable(key = "#p0")
    public AuxiliaryInfor findById(Long id);

}
